﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;

namespace SIGBugs.Client.Libs
{
    public static class JsonHelper
    {
        public static T ReadJson<T>(Stream stream)
        {
            using (var reader = new StreamReader(stream))
            {
                using (var jr = new JsonTextReader(reader))
                {
                    dynamic d = new JsonSerializer().Deserialize(jr);
                    return d;
                }
            }
        }
    }
}
